Literals in VectorScript are data values that appear directly within the script code. Literals can be numbers, text strings, the Boolean values
TRUE and
FALSE, or the special value
NIL. The following subsections describe each literal type.
Boolean literals in VectorScript represent a “truth value” (whether something is true or false). Most comparison operations in VectorScript yield a Boolean value that indicates whether the operation succeeded or failed. Since there are two possible truth states, there are two Boolean literals in VectorScript: the keywords
TRUE and
FALSE.
The last literal type in VectorScript is a specialized literal, the NIL literal. Other literals in VectorScript represent a particular type of data. The NIL literal is different—it represents a lack of value. In a sense, NIL is like zero for data types other than numbers. NIL is usually associated with the HANDLE data type, where its use indicates that no handle exists.